

<template>
  <div class="page-wrapper">
    <div class="header-wrapper">
      <h2 class="top">
        <van-icon class="back-icon" @click="fanhui1" name="arrow-left" size="30px" />
        <span class="title-text">结果</span>
      </h2>
    </div>
    <div class="yuan">
      <van-icon name="checked" size="100px" color="#006EF1"/>
    </div>
    <h2 style="text-align: center">提交成功</h2>
    <h6 style="text-align: center;color: #ABABAC">您的申请已提交，正在等待医生审核</h6>
    <el-button style="width: 80%;margin-left: 10%" type="primary" @click="jinqu">查看预约详情</el-button>
    <el-button style="width: 80%;margin-left: 10%;margin-top: 20px" @click="fanhui">返回首页</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false,
      serviceNumber:''
    };
  },
  methods: {
    fanhui(){
      this.$router.push('/');
    },
    fanhui1(){
      this.$router.push('/apply');
    },
    jinqu(){
      this.$router.push({path: '/serviceDetails',query: {serviceNumber: this.serviceNumber}});
    },
  },
  created() {
    const token = JSON.parse(localStorage.getItem("token"));
    if (!token) {
      this.$message.error('请先登录');
      setTimeout(() => {
        this.$router.push({name: 'login'});
      });
    }
    // 设置全局默认请求头
    this.axios.defaults.headers.common['token'] = token;
    this.doctorId = JSON.parse(localStorage.getItem("doctorId"));
    this.serviceNumber = this.$route.query.serviceNumber
  },
};
</script>
<style scoped>
.yuan{
  width: 100%;
  height: 110px;
  margin-top: 50px;
  text-align: center;
}
.page-wrapper {
  min-height: 100vh;
  background-color: #F5F9FD;
}

.header-wrapper {
  background-color: white;
}

.top {
  display: flex;
  align-items: center;
  height: 50px;
  position: relative;
}

.back-icon {
  position: absolute;
  left: 10px;
}

.title-text {
  width: 100%;
  text-align: center;
}


.article-text p {
  font-size: 12px;
  color: gray;
}


.tu-pian img {
  width: 150px;
  height: 150px;
  float: left;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 128, 255, 0.2);
}


.page-wrapper {
  min-height: 100vh;
  background-color: #F5F9FD;
}

.header-wrapper {
  background-color: white;
}

.top {
  display: flex;
  align-items: center;
  height: 50px;
  position: relative;
}

.back-icon {
  position: absolute;
  left: 10px;
}

.title-text {
  width: 100%;
  text-align: center;
}

img {
  //background-color: red;
  width: 100%;
  height: 100%;
}
</style>